/**
 * Copyright (C), 2019-2020, 宇信融汇
 * FileName: T2
 * Author:   xbliu
 * Date:     2020/6/18 16:04
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * xbliu           修改时间           版本号              描述
 */
package c_003;

/**
 * @Classname T2
 * @Description TODO
 * @Date 2020/6/18 16:04
 * @Created by xbliu
 */
public class T2 {
    public static void add(int a, int b) {
        int tmp = a;
        a = b;
        b = tmp;
    }

    public static void addStr(String a, String b) {
        String tmp = a;
        a = b;
        b = tmp;
    }

    public static void main(String[] args) {
//        int a = 10;
//        int b = 20;
//        add(a, b);
        String a = "abc";
        String b = "cba";
        addStr(a, b);
        System.out.println(a);
        System.out.println(b);
    }
}
  